import request from '@/utils/request.js'

const videoHost = '/eduservice/video'
const videoSource = '/eduvod/video'

export default {

    saveVideo(video) {
        return new request({
            url: `${videoHost}/save`,
            method: "post",
            data: video
        })
    },
    updateVideo(video) {
        return new request({
            url: `${videoHost}/update`,
            method: "post",
            data: video
        })
    },
    getVideo(videoId) {
        return new request({
            url: `${videoHost}/getVideo/${videoId}`,
            method: "get"
        })
    },
    deleteVideo(videoId) {
        return new request({
            url: `${videoHost}/delete/${videoId}`,
            method: "post"
        })
    },
    removevideoSourceById(videoSourceId){
        return new request({
            url: `${videoSource}/delete/${videoSourceId}`,
            method: "delete"
        })
    }
}